package com.iie.bigVideo.mapper;

import com.iie.bigVideo.entity.Catalog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.iie.bigVideo.entity.dto.CatalogDto;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author XXX
 * @since 2023-11-24
 */
public interface CatalogMapper extends BaseMapper<Catalog> {

    List<CatalogDto> queryCatalog();

    List<Catalog> queryCatalogVolume(@Param("directory") int directory);

    List<CatalogDto> queryCatalogList(@Param("current") int current, @Param("size") int size);

    Integer countCatalog();

    List<Catalog> queryByCatalogId(@Param("userId") String userId);

    List<CatalogDto> queryByCatalogIdList(@Param("userId") String userId);

    Integer addCatalogDirectory(Catalog catalog);

    Boolean updateCatalog(Catalog catalog);

    List<CatalogDto> queryCatalogVolumeWithVideo(@Param("catalogId") String catalogId);

    String queryCatalogByCatalogId(@Param("catalogId") int catalogId);

    HashMap<String, String> queryCatalogByCatalogIdVideo(@Param("catalogId") String catalogId);

    Integer deleteCatalogList(@Param("catalogId") String catalogId);

    Integer deleteVideoList(@Param("videoId") String videoId);

    Catalog queryAloneByCatalogId(@Param("catalogId") String catalogId);
    
    List<CatalogDto> queryCatalogWithAnnex(@Param("catalogId") String catalogId);

}
